<template>
  <div>
    <Head>
      <Script src="https://res.wx.qq.com/open/js/jweixin-1.4.0.js"></script>
      <Script src="https://unpkg.com/@dcloudio/uni-webview-js@0.0.3/index.js"></Script>
    </Head>
    <h1>活动页面</h1>
    <p v-for="stu in data.data.rows" :key="stu._id">
        姓名：{{stu.name}},
        性别{{stu.gender}},
        年龄{{stu.age}},
    </p>
    <button type="button" @click="forward">跳转小程序</button>
  </div>
</template>
// <script lang="ts">
// import {defineComponent} from 'vue'
// export default defineComponent({
//   methods:{
//     forward(){
//       console.log("uni,",uni);
//     }
//   }
// })
// </script>
<script lang="ts" setup>

import {getStudents} from '../services/student'
let {data} = useAsyncData("showStudent",() => getStudents({current:1,pageSize:10}));
const forward = () => {
  console.log("uni",uni);
  uni.navigateTo({
    url:"/pages/detail/detail"
  });
}
</script>

<style>

</style>